package com.qf.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.qf.mapper.DtsUserAccountMapper;
import com.qf.pojo.DtsUserAccount;
import com.qf.service.UserAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserAccountServiceImpl implements UserAccountService {
    @Autowired
    private DtsUserAccountMapper dtsUserAccountMapper;

    @Override
    public void settlementRate(Integer userId, Integer settlementRate) {

        dtsUserAccountMapper.updateSettlementRateByUserId(userId,settlementRate);

    }

    @Override
    public DtsUserAccount findByUserId(Integer id) {
        return dtsUserAccountMapper.selectOne(
                new QueryWrapper<DtsUserAccount>().eq("user_id",id));
    }
}
